Computer system to support failover in an event stream processing system

ABSTRACT

In a system, a first status of a first ESP engine (ESPE) executing at a first computing device is determined as newly active; a last published event block object identifier is determined as an identifier uniquely identifying a last event block object published to an out-messaging network device; a next event block object having an event block object identifier greater than the determined last published event block object identifier is selected from a first computer-readable medium; and the selected next event block object is published to the out-messaging network device. A first event block object is received from a second ESPE executing at a second computing device. A first status of the second ESPE is determined as standby by the second computing device. The received first event block object is stored by the second computing device in a second non-transitory computer-readable medium.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of U.S. patent applicationSer. No. 14/662,528 that was filed Mar. 19, 2015, the entire contents ofwhich are hereby incorporated by reference. The present application alsoclaims the benefit of 35 U.S.C. §119(e) to U.S. Provisional PatentApplication No. 62/008,725 filed Jun. 6, 2014, and to U.S. ProvisionalPatent Application No. 62/134,852 filed Mar. 18, 2015, the entirecontents of which are hereby incorporated by reference.

BACKGROUND

An increasing number of distributed applications process continuouslyflowing data from distributed sources by applying queries to the databefore distributing the data to geographically distributed recipients.An event stream processing engine (ESPE) continuously applies thequeries to the data as it is received and determines which entitiesreceive the processed data.

SUMMARY

In an example embodiment, a system is provided to support a failoverwhen event stream processing (ESP) event blocks. The system includes,but is not limited to, a first computing device and a second computingdevice. The first computing device includes, but is not limited to, afirst processor configured to execute a first ESP engine (ESPE) and afirst non-transitory computer-readable medium comprising firstcomputer-readable instructions stored thereon. The second computingdevice includes, but is not limited to, a second processor configured toexecute a second ESPE and a second non-transitory computer-readablemedium comprising second computer-readable instructions stored thereon.

The first computer-readable instructions cause the first computingdevice to determine a first status of the first ESPE executing at thefirst computing device as newly active; when the first status of thefirst ESPE is determined as newly active, to determine a last publishedevent block object identifier as an identifier that uniquely identifiesa last event block object published to an out-messaging network device;when the first status of the first ESPE is determined as newly active,to select a next event block object having an event block objectidentifier that is greater than the determined last published eventblock object identifier from the first non-transitory computer-readablemedium; and when the first status of the first ESPE is determined asnewly active, to publish the selected next event block object to theout-messaging network device. The second computer-readable instructionscause a second computing device to receive a first event block objectfrom a second ESPE executing at the second computing device, wherein thefirst event block object includes a unique identifier of the first eventblock object; to determine a first status of the second ESPE as standby;and when the first status of the second ESPE is determined as standby,to store the received first event block object in the secondnon-transitory computer-readable medium.

In another example embodiment, a plurality of non-transitorycomputer-readable media are provided. The plurality of non-transitorycomputer-readable media includes, but are not limited to, a firstnon-transitory computer-readable medium comprising firstcomputer-readable instructions stored thereon and a secondnon-transitory computer-readable medium comprising secondcomputer-readable instructions stored thereon. The firstcomputer-readable instructions cause a first computing device todetermine a first status of a first event stream processing engine(ESPE) executing at the first computing device as newly active; when thefirst status of the first ESPE is determined as newly active, todetermine a last published event block object identifier as anidentifier that uniquely identifies a last event block object publishedto an out-messaging network device; when the first status of the firstESPE is determined as newly active, to select a next event block objecthaving an event block object identifier that is greater than thedetermined last published event block object identifier from the firstnon-transitory computer-readable medium; and when the first status ofthe first ESPE is determined as newly active, to publish the selectednext event block object to the out-messaging network device. The secondcomputer-readable instructions cause a second computing device toreceive a first event block object from a second ESPE executing at thesecond computing device, wherein the first event block object includes aunique identifier of the first event block object; to determine a firststatus of the second ESPE as standby; and when the first status of thesecond ESPE is determined as standby, to store the received first eventblock object in the second non-transitory computer-readable medium.

In yet another example embodiment, a method of supporting failover in anevent stream processing system is provided. In the method, a firststatus of a first ESP engine (ESPE) executing at a first computingdevice is determined as newly active. A last published event blockobject identifier as an identifier that uniquely identifies a last eventblock object published to an out-messaging network device is determinedby the first computing device. A next event block object having an eventblock object identifier that is greater than the determined lastpublished event block object identifier is selected, by the firstcomputing device, from a first non-transitory computer-readable medium.The selected next event block object is published to the out-messagingnetwork device by the first computing device. A first event block objectis received from a second ESPE executing at a second computing device.The first event block object includes a unique identifier of the firstevent block object. A first status of the second ESPE is determined asstandby by the second computing device. The received first event blockobject is stored by the second computing device in a secondnon-transitory computer-readable medium

Other principal features of the disclosed subject matter will becomeapparent to those skilled in the art upon review of the followingdrawings, the detailed description, and the appended claims.

BRIEF DESCRIPTION OF THE DRAWINGS

Illustrative embodiments of the disclosed subject matter will hereafterbe described referring to the accompanying drawings, wherein likenumerals denote like elements.

FIG. 1 depicts a block diagram of an event stream processing (ESP)system in accordance with an illustrative embodiment.

FIG. 2 depicts a block diagram of a publishing device of eventpublishing systems of the ESP system of FIG. 1 in accordance with anillustrative embodiment.

FIG. 3 depicts a block diagram of a subscribing device of eventsubscribing systems of the ESP system of FIG. 1 in accordance with anillustrative embodiment.

FIG. 4 depicts a block diagram of an ESP device of the ESP system ofFIG. 1 in accordance with an illustrative embodiment.

FIG. 5 depicts a flow diagram illustrating examples of operationsperformed by the ESP device of FIG. 4 in accordance with an illustrativeembodiment.

FIG. 6 depicts a block diagram of an ESP engine executing at the ESPdevice of FIG. 4 in accordance with an illustrative embodiment.

FIG. 7 depicts a block diagram illustrating interactions among thecomponents of the ESP system of FIG. 1 in accordance with anillustrative embodiment.

FIG. 8 depicts a second block diagram illustrating interactions amongthe components of the ESP system of FIG. 1 in accordance with anillustrative embodiment.

FIG. 9 depicts flow diagrams illustrating examples of operationsperformed by the publishing device of FIG. 2 in accordance with anillustrative embodiment.

FIG. 10 depicts flow diagrams illustrating examples of operationsperformed by the subscribing device of FIG. 3 in accordance with anillustrative embodiment.

FIG. 11 depicts a block diagram illustrating interactions among thecomponents of a second ESP system of FIG. 1 in accordance with anillustrative embodiment.

FIG. 12 depicts a block diagram of a second ESP device of the second ESPsystem of FIG. 11 in accordance with an illustrative embodiment.

FIG. 13 depicts a flow diagram illustrating examples of operationsperformed by the second ESP device of FIG. 12 in accordance with anillustrative embodiment.

FIG. 14 depicts flow diagrams illustrating examples of operationsperformed by the publishing device of FIG. 2 as part of the second ESPsystem of FIG. 11 in accordance with an illustrative embodiment.

FIG. 15 depicts flow diagrams illustrating examples of operationsperformed by the subscribing device of FIG. 3 as part of the second ESPsystem of FIG. 11 in accordance with an illustrative embodiment.

FIG. 16 depicts a block diagram of a third ESP system that supports afailover when event stream processing event blocks in accordance with anillustrative embodiment.

FIG. 17 depicts flow diagrams illustrating examples of operationsperformed by the publishing device of FIG. 2 as part of the third ESPsystem of FIG. 16 in accordance with an illustrative embodiment.

FIG. 18 depicts a flow diagram illustrating examples of operationsperformed by the second ESP device of FIG. 12 included as part of thethird ESP system of FIG. 16 in support of a failover when event streamprocessing event blocks in accordance with an illustrative embodiment.

DETAILED DESCRIPTION

Referring to FIG. 1, a block diagram of an event stream processing (ESP)system 100 is shown in accordance with an illustrative embodiment. In anillustrative embodiment, ESP system 100 may include an ESP device 102,event publishing systems 104, event subscribing systems 106, and anetwork 108. The event publishing systems 104 publish data to ESP device102, which receives the published data. ESP device 102 processes thepublished data. The event subscribing systems 106 subscribe to andreceive the published data after processing by ESP device 102.

As used herein, the data may include any type of content represented inany computer-readable format such as binary, alphanumeric, numeric,string, markup language, etc. The content may include textualinformation, graphical information, image information, audioinformation, numeric information, etc. that further may be encoded usingvarious encoding techniques as understood by a person of skill in theart.

The components of ESP system 100 may be included in a single computingdevice, may be located in a single room or adjacent rooms, in a singlefacility, and/or may be distributed geographically from one another.Each of ESP device 102, the event publishing systems 104, and the eventsubscribing systems 106 may be composed of one or more discrete devices.

Network 108 may include one or more networks of the same or differenttypes. Network 108 can be any type of wired and/or wireless public orprivate network including a cellular network, a local area network, awide area network such as the Internet, etc. Network 108 further maycomprise sub-networks and consist of any number of devices.

ESP device 102 can include any type of computing device. The computingdevice sends and receives signals through network 108 to/from eventpublishing systems 104 and to/from event subscribing systems 106. ESPdevice 102 may communicate using various transmission media that may bewired and/or wireless as understood by those skilled in the art.

The event publishing systems 104 can include any number and type ofcomputing devices that may be organized into subnets. The computingdevices of the event publishing systems 104 send and receive signalsthrough network 108 to/from another of the one or more computing devicesof the event publishing systems 104, to/from ESP device 102, and/orto/from the event subscribing systems 106. The one or more computingdevices of the event publishing systems 104 may include computers of anyform factor such as a laptop 110, a desktop 112, a smart phone 114, apersonal digital assistant, an integrated messaging device, a tabletcomputer, etc. The one or more computing devices of the event publishingsystems 104 may communicate using various transmission media that may bewired and/or wireless as understood by those skilled in the art.

The event subscribing systems 106 can include any number and type ofcomputing devices that may be organized into subnets. The computingdevices of the event subscribing systems 106 send and receive signalsthrough network 108 to/from another of the one or more computing devicesof the event subscribing systems 106, to/from ESP device 102, and/orto/from the event publishing systems 104. The one or more computingdevices of the event subscribing systems 106 may include computers ofany form factor such as a laptop 116, a desktop 118, a smart phone 120,an integrated messaging device, a personal digital assistant, a tabletcomputer, etc. The one or more computing devices of the eventsubscribing systems 106 may communicate using various transmission mediathat may be wired and/or wireless as understood by those skilled in theart.

Referring to FIG. 2, a block diagram of a publishing device 200 of theevent publishing systems 104 is shown in accordance with an illustrativeembodiment. Publishing device 200 is an example computing device of theevent publishing systems 104. Publishing device 200 may include an inputinterface 204, an output interface 206, a communication interface 208, acomputer-readable medium 210, a processor 212, a keyboard 214, a mouse216, a display 218, a speaker 220, a printer 222, and an eventpublishing application 224. Fewer, different, or additional componentsmay be incorporated into publishing device 200.

Input interface 204 provides an interface for receiving information fromthe user for entry into publishing device 200 as understood by thoseskilled in the art. Input interface 204 may interface with various inputtechnologies including, but not limited to, keyboard 214, mouse 216,display 218, a track ball, a keypad, one or more buttons, etc. to allowthe user to enter information into publishing device 200 or to makeselections presented in a user interface displayed on display 218. Thesame interface may support both input interface 204 and output interface206. For example, a display comprising a touch screen both allows userinput and presents output to the user. Publishing device 200 may haveone or more input interfaces that use the same or a different inputinterface technology. The input interface technology further may beaccessible by publishing device 200 through communication interface 208.

Output interface 206 provides an interface for outputting informationfor review by a user of publishing device 200. For example, outputinterface 206 may interface with various output technologies including,but not limited to, display 218, speaker 220, printer 222, etc.Publishing device 200 may have one or more output interfaces that usethe same or a different interface technology. The output interfacetechnology further may be accessible by publishing device 200 throughcommunication interface 208.

Communication interface 208 provides an interface for receiving andtransmitting data between devices using various protocols, transmissiontechnologies, and media as understood by those skilled in the art.Communication interface 208 may support communication using varioustransmission media that may be wired and/or wireless. Publishing device200 may have one or more communication interfaces that use the same or adifferent communication interface technology. For example, publishingdevice 200 may support communication using an Ethernet port, a Bluetoothantenna, a telephone jack, a USB port, wireless compatible devices, etc.Data and messages may be transferred between publishing device 200 andESP device 102 and/or the event subscribing systems 106 usingcommunication interface 208.

Computer-readable medium 210 is an electronic holding place or storagefor information so the information can be accessed by processor 212 asunderstood by those skilled in the art. Computer-readable medium 210 caninclude, but is not limited to, any type of random access memory (RAM),any type of read only memory (ROM), any type of flash memory, etc. suchas magnetic storage devices (e.g., hard disk, floppy disk, magneticstrips, . . . ), optical disks (e.g., compact disc (CD), digitalversatile disc (DVD), . . . ), smart cards, flash memory devices, etc.Publishing device 200 may have one or more computer-readable media thatuse the same or a different memory media technology. Publishing device200 also may have one or more drives that support the loading of amemory media such as a CD or DVD, an external hard drive, etc. One ormore external hard drives further may be connected to publishing device200 using communication interface 208.

Processor 212 executes instructions as understood by those skilled inthe art. The instructions may be carried out by a special purposecomputer, logic circuits, or hardware circuits. Processor 212 may beimplemented in hardware and/or firmware. Processor 212 executes aninstruction, meaning it performs/controls the operations called for bythat instruction. The term “execution” can refer to the process ofrunning an application or the carrying out of the operation called forby an instruction. The instructions may be written using one or moreprogramming language, scripting language, assembly language, etc.Processor 212 operably couples with input interface 204, with outputinterface 206, with communication interface 208, and withcomputer-readable medium 210 to receive, to send, and to processinformation. Processor 212 may retrieve a set of instructions from apermanent memory device and copy the instructions in an executable formto a temporary memory device that may be some form of RAM, for example.Publishing device 200 may include a plurality of processors that use thesame or a different processing technology.

Event publishing application 224 performs operations associated withcreating and publishing data. For illustration, event publishingapplication 224 may publish data generated by a sensor, data generatedor captured in response to occurrence of an event or a transaction, datagenerated by a device such as in response to an interaction by a userwith the device, etc. Some or all of the operations described herein maybe embodied in event publishing application 224. The operations may beimplemented using hardware, firmware, software, or any combination ofthese methods. Referring to the example embodiment of FIG. 2, eventpublishing application 224 is implemented in software (comprised ofcomputer-readable and/or computer-executable instructions) stored incomputer-readable medium 210 and accessible by processor 212 forexecution of the instructions that embody the operations of eventpublishing application 224. Event publishing application 224 may bewritten using one or more programming languages, assembly languages,scripting languages, etc.

Event publishing application 224 may be implemented as a Webapplication. For example, event publishing application 224 may beconfigured to receive hypertext transport protocol (HTTP) responses andto send HTTP requests. The HTTP responses may include web pages such ashypertext markup language (HTML) documents and linked objects generatedin response to the HTTP requests. Each web page may be identified by auniform resource locator (URL) that includes the location or address ofthe computing device that contains the resource to be accessed inaddition to the location of the resource on that computing device. Thetype of file or resource depends on the Internet application protocolsuch as the file transfer protocol, HTTP, H.323, etc. The file accessedmay be a simple text file, an image file, an audio file, a video file,an executable, a common gateway interface application, a Java applet, anextensible markup language (XML) file, or any other type of filesupported by HTTP.

Referring to FIG. 3, a block diagram of a subscribing device 300 of theevent subscribing systems 106 is shown in accordance with an exampleembodiment. Subscribing device 300 is an example computing device of theevent subscribing systems 106. Subscribing device 300 may include asecond input interface 304, a second output interface 306, a secondcommunication interface 308, a second computer-readable medium 310, asecond processor 312, and an event subscription application 324. Fewer,different, or additional components may be incorporated into subscribingdevice 300.

Second input interface 304 provides the same or similar functionality asthat described with reference to input interface 204 of publishingdevice 200 though referring to subscribing device 300. Second outputinterface 306 provides the same or similar functionality as thatdescribed with reference to output interface 206 of publishing device200 though referring to subscribing device 300. Second communicationinterface 308 provides the same or similar functionality as thatdescribed with reference to communication interface 208 of publishingdevice 200 though referring to subscribing device 300. Data and messagesmay be transferred between subscribing device 300 and ESP device 102and/or the event publishing systems 104 using second communicationinterface 308. Second computer-readable medium 310 provides the same orsimilar functionality as that described with reference tocomputer-readable medium 210 of publishing device 200 though referringto subscribing device 300. Second processor 312 provides the same orsimilar functionality as that described with reference to processor 212of publishing device 200 though referring to subscribing device 300.

Event subscription application 324 performs operations associated withreceiving the data published by the one or more computing devices of theevent publishing systems 104 and processed by ESP device 102. Some orall of the operations described herein may be embodied in eventsubscription application 324. The operations may be implemented usinghardware, firmware, software, or any combination of these methods.Referring to the example embodiment of FIG. 3, event subscriptionapplication 324 is implemented in software (comprised ofcomputer-readable and/or computer-executable instructions) stored insecond computer-readable medium 310 and accessible by second processor312 for execution of the instructions that embody the operations ofevent subscription application 324. Event subscription application 324may be written using one or more programming languages, assemblylanguages, scripting languages, etc. Event subscription application 324may be implemented as a Web application.

Referring to FIG. 4, a block diagram of ESP device 102 is shown inaccordance with an illustrative embodiment. ESP device 102 may includeone or more computers of any form factor. ESP device 102 may include athird input interface 404, a third output interface 406, a thirdcommunication interface 408, a third computer-readable medium 410, athird processor 412, a database 414, and an ESP application 416. Fewer,different, or additional components may be incorporated into ESP device102.

Third input interface 404 provides the same or similar functionality asthat described with reference to input interface 204 of publishingdevice 200 though referring to ESP device 102. Third output interface406 provides the same or similar functionality as that described withreference to output interface 206 of publishing device 200 thoughreferring to ESP device 102. Third communication interface 408 providesthe same or similar functionality as that described with reference tocommunication interface 208 of publishing device 200 though referring toESP device 102. Data and messages may be transferred between ESP device102 and the event subscribing systems 106 and/or the event publishingsystems 104 using third communication interface 408. Thirdcomputer-readable medium 410 provides the same or similar functionalityas that described with reference to computer-readable medium 210 ofpublishing device 200 though referring to ESP device 102. Thirdprocessor 412 provides the same or similar functionality as thatdescribed with reference to processor 212 of publishing device 200though referring to ESP device 102.

ESP device 102 includes or can access database 414 either through adirect connection or through network 108 using third communicationinterface 408. Third computer-readable medium 410 may provide theelectronic storage medium for database 414. Database 414 is a datarepository for ESP system 100. The data stored in database 414 mayinclude any type of content represented in any computer-readable formatsuch as binary, alphanumeric, numeric, string, markup language, etc. Thecontent may include textual information, graphical information, imageinformation, audio information, numeric information, etc. that furthermay be encoded using various encoding techniques as understood by aperson of skill in the art.

Database 414 may be implemented using various formats as known to thoseskilled in the art including a file system, a relational database, asystem of tables, a structured query language database, etc. Forexample, database 414 may be stored in a cube distributed across a gridof computers as understood by a person of skill in the art. As anotherexample, database 414 may be stored in a multi-node Hadoop® cluster, asunderstood by a person of skill in the art. Apache™ Hadoop®, forexample, is an open-source software framework for distributed computingsupported by the Apache Software Foundation. As another example,database 414 may be stored in a cloud of computers and accessed usingcloud computing technologies, as understood by a person of skill in theart. The SAS® LASR™ Analytic Server, for example, developed and providedby SAS Institute Inc. of Cary, N.C., USA may be used as an analyticplatform to enable multiple users to concurrently access data stored indatabase 414. Other servers and systems may be used.

ESP application 416 performs operations associated with processing datacreated by the one or more computing devices of the event publishingsystems 104 and sending the processed data to the one or more computingdevices of the event subscribing systems 106 based on the subscriptionrequest of each computing device of the event subscribing systems 106.ESP application 416 may embed an ESP engine (ESPE) with its owndedicated thread pool or pools into its application space where the mainapplication thread can do application-specific work and the ESPEprocesses event streams at least by creating an instance of a model intoprocessing objects. Some or all of the operations described herein maybe embodied in ESP application 416. The operations may be implementedusing hardware, firmware, software, or any combination of these methods.Referring to the example embodiment of FIG. 4, ESP application 416 isimplemented in software (comprised of computer-readable and/orcomputer-executable instructions) stored in third computer-readablemedium 410 and accessible by third processor 412 for execution of theinstructions that embody the operations of ESP application 416. ESPapplication 416 may be written using one or more programming languages,assembly languages, scripting languages, etc. ESP application 416 may beimplemented as a Web application, for example.

Event subscription application 324, event publishing application 224,and ESP application 416 may save or store data to database 414 andaccess or retrieve data from database 414. Event subscriptionapplication 324, event publishing application 224, and ESP application416 may be the same or different applications or part of an integrated,distributed application supporting some or all of the same or additionaltypes of functionality as described herein. As an example, thefunctionality provided by ESP application 416 may be provided as part ofthe DataFlux ESP Engine developed and provided by SAS Institute Inc. ofCary, N.C., USA and/or ESP applications offered by other softwarevendors. Various levels of integration between the components of ESPsystem 100 may be implemented without limitation as understood by aperson of skill in the art. For example, all of the functionalitydescribed for ESP system 100 may be implemented in a single computingdevice.

Referring to FIG. 5, example operations associated with ESP application416 are described. ESP application 416 defines how input event streamsfrom publishers are transformed into meaningful output event streamsconsumed by subscribers. Additional, fewer, or different operations maybe performed depending on the embodiment. The order of presentation ofthe operations of FIG. 5 is not intended to be limiting. A user caninteract with one or more user interface windows presented to the userin a display such as display 218 under control of ESP application 416independently or through a browser application in an order selectable bythe user. Although some of the operational flows are presented insequence, the various operations may be performed in variousrepetitions, concurrently, and/or in other orders than those that areillustrated. For example, a user may execute ESP application 416, whichcauses presentation of a first user interface window, which may includea plurality of menus and selectors such as drop down menus, buttons,text boxes, hyperlinks, etc. associated with ESP application 416 asunderstood by a person of skill in the art. As further understood by aperson of skill in the art, various operations may be performed inparallel, for example, using a plurality of threads.

In an operation 500, ESP application 416 defines and starts an ESPengine (ESPE) thereby instantiating an ESPE at ESP device 102. Forexample, referring to FIG. 6, the components of an ESPE 600 executing atESP device 102 are shown in accordance with an illustrative embodiment.ESPE 600 may include one or more projects 602. A project may bedescribed as a second-level container in an engine model managed by ESPE600 where a thread pool size for the project may be defined by a user. Avalue of 1 for the thread pool size indicates that writes aresingle-threaded. Each project of the one or more projects 602 mayinclude one or more continuous queries 604 that contain data flows,which are data transformations of incoming event streams. The one ormore continuous queries 604 may include one or more source windows 606and one or more derived windows 608.

The engine container is the top-level container in a model that managesthe resources of the one or more projects 602. In an illustrativeembodiment, for example, there can be only one ESPE 600 for eachinstance of ESP application 416, and ESPE 600 has a unique engine name.Additionally, the one or more projects 602 may each have unique projectnames, and each query may have a unique continuous query name and beginwith a uniquely named source window of the one or more source windows606. ESPE 600 may or may not be persistent.

Continuous query modeling involves defining directed graphs of windowsfor event stream manipulation and transformation. A window in thecontext of event stream manipulation and transformation is a processingnode in an event stream processing model. A window in a continuous querycan perform aggregations, computations, pattern-matching, and otheroperations on data flowing through the window. A continuous query may bedescribed as a directed graph of source, relational, pattern matching,and procedural windows. The one or more source windows 606 and the oneor more derived windows 608 represent continuously executing queriesthat generate updates to a query result set as new event blocks streamthrough ESPE 600. A directed graph, for example, is a set of nodesconnected by edges, where the edges have a direction associated withthem.

An event object may be described as a packet of data accessible as acollection of fields, with at least one of the fields defined as a keyor unique identifier (ID). The event object may be created using avariety of formats including binary, alphanumeric, XML, etc. Each eventobject may include one or more fields designated as a primary identifier(ID) for the event so ESPE 600 can support operation codes (opcodes) forevents including insert, update, upsert, and delete. Upsert opcodesupdate the event if the key field already exists; otherwise, the eventis inserted. For illustration, an event object may be a packed binaryrepresentation of a set of field values and include both metadata andfield data associated with an event. The metadata may include an opcodeindicating if the event represents an insert, update, delete, or upsert,a set of flags indicating if the event is a normal, partial-update, or aretention generated event from retention policy management, and a set ofmicrosecond timestamps that can be used for latency measurements.

An event block object may be described as a grouping or package of eventobjects. An event stream may be described as a flow of event blockobjects. A continuous query of the one or more continuous queries 604transforms a source event stream made up of streaming event blockobjects published into ESPE 600 into one or more output event streamsusing the one or more source windows 606 and the one or more derivedwindows 608. A continuous query can also be thought of as data flowmodeling.

The one or more source windows 606 are at the top of the directed graphand have no windows feeding into them. Event streams are published intothe one or more source windows 606, and from there, the event streamsare directed to the next set of connected windows as defined by thedirected graph. The one or more derived windows 608 are all instantiatedwindows that are not source windows and that have other windowsstreaming events into them. The one or more derived windows 608 performcomputations or transformations on the incoming event streams. The oneor more derived windows 608 transform event streams based on the windowtype (that is operators such as join, filter, compute, aggregate, copy,pattern match, procedural, union, etc.) and window settings. As eventstreams are published into ESPE 600, they are continuously queried, andthe resulting sets of derived windows in these queries are continuouslyupdated.

ESP application 416 may be developed, for example, using a modelingapplication programming interface (API) that provides a set of classeswith member functions. As an example, the SAS ESP Engine developed andprovided by SAS Institute Inc. of Cary, N.C., USA provides a modelingAPI that provides a set of classes with member functions. Thesefunctions enable ESP application 416 to embed ESPE 600 possibly withdedicated thread pools into its own process space. Alternatively, ESPE600 can be embedded into the process space of an existing or a newapplication. In that case, a main application thread is focused on itsown chores and interacts with the embedded ESPE 600 as needed.

Referring to FIG. 5, in an operation 502, the engine container iscreated. For illustration, ESPE 600 may be instantiated using a functioncall that specifies the engine container as a manager for the model. Thefunction call may include the engine name for ESPE 600 that is providedby a user or a developer and may be unique to ESPE 600.

In an operation 504, the one or more continuous queries 604 areinstantiated by ESPE 600 as a model. The one or more continuous queries604 may be instantiated with a dedicated thread pool or pools thatgenerate updates as new events stream through ESPE 600. Forillustration, the one or more continuous queries 604 may be created tomodel business processing logic within ESPE 600, to predict eventswithin ESPE 600, to model a physical system within ESPE 600, to predictthe physical system state within ESPE 600, etc. For example, ESPE 600may be used to support sensor data monitoring and management (e.g.,sensing may include force, torque, load, strain, position, temperature,air pressure, fluid flow, chemical properties, resistance,electromagnetic fields, radiation, irradiance, proximity, acoustics,moisture, distance, speed, vibrations, acceleration, electricalpotential, or electrical current, etc.), capital markets tradingsystems, fraud detection and prevention, personalized marketing,operational systems monitoring and management, cyber security analytics,etc.

To create a continuous query, input event structures that are schemaswith keys that flow into the one or more source windows 606 may beidentified. Output event structures that are also schemas with keysgenerated by the one or more source windows 606 and/or the one or morederived windows 608 may also be identified. For example, the block ofcode below illustrates creation of a compute window that normalizes a“City” field that is created for events in that window:

dfESPwindow_source *sw; sw = contQuery−>newWindow_source(“sourceWindow”,depot, dfESPindextypes::pi_HASH,dfESPstring(“name:string,ID*:int32,city:string”)); dfESPschema*sw_schema = sw−>getSchema( ); dfESPwindow_compute *cw; cw =contQuery−>newWindow_compute(“computeWindow”, depot,dfESPindextypes::pi_HASH,dfESPstring(“ID*:int32,name:string,oldCity:string,newCity:string”)); //Register the non-key field calculation expressions.cw−>addNonKeyFieldCalc(“name”); // pass name through unchangedcw−>addNonKeyFieldCalc(“city”); // pass city through unchanged // Runcity through the blue fusion standardize function. char newCity[1024] =“bluefusion bf\r\n”; strcat(newCity, “String result\r\n”);strcat(newCity, “bf = bluefusion_initialize( )\r\n”); strcat(newCity,“if (isnull(bf)) then\r\n”); strcat(newCity, “ print(bf.getlasterror())\r\n”); strcat(newCity, “if (bf.loadqkb(\“ENUSA\”) == 0) then\r\n”);strcat(newCity, “ print(bf.getlasterror( ))\r\n”); strcat(newCity, “if(bf.standardize(\“City\”,city,result) == 0) then\r\n”); strcat(newCity,“ print(bf.getlasterror( ))\r\n”); strcat(newCity, “return result”);cw−>addNonKeyFieldCalc(newCity); // Add the subscriber callbacks to thewindows cw−>addSubscriberCallback(winSubscribe_compute); // Add windowconnectivity contQuery−>addEdge(sw, 0, cw); // create and start theproject project−>setNumThreads(2); myEngine−>startProjects( ); //declare variables to build up the input data.dfESPptrVect<dfESPeventPtr> trans; dfESPevent *p; // Insert multipleevents p = new dfESPevent(sw_schema,(char *)“i,n,Jerry, 1111, apex”);trans.push_back(p); p = new dfESPevent(sw_schema,(char *)“i,n,Scott,1112, caryy”); trans.push_back(p); p = new dfESPevent(sw_schema,(char*)“i,n,someone, 1113, rallleigh”); trans.push_back(p);dfESPeventblockPtr ib = dfESPeventblock::newEventBlock(&trans,dfESPeventblock::ebt_TRANS); project−>injectData(contQuery, sw, ib);

ESPE 600 may analyze and process events in motion or “event streams.”Instead of storing data and running queries against the stored data,ESPE 600 may store queries and stream data through them to allowcontinuous analysis of data as it is received. The one or more sourcewindows 606 and the one or more derived windows 608 may be created basedon the relational, pattern matching, and procedural algorithms thattransform the input event streams into the output event streams tomodel, simulate, score, test, predict, etc. based on the continuousquery model defined and application to the streamed data.

In an operation 506, a publish/subscribe (pub/sub) capability isinitialized for ESPE 600. In an illustrative embodiment, a pub/subcapability is initialized for each project of the one or more projects602. To initialize and enable pub/sub capability for ESPE 600, a portnumber is provided. Pub/sub clients can use a host name of ESP device102 and the port number to establish pub/sub connections to ESPE 600.For example, a server listener socket is opened for the port number toenable of event publishing systems 104 and event subscribing systems 106to connect to ESPE 600 for publish/subscribe services. The host name ofESP device 102 and the port number to establish pub/sub connections toESPE 600 may be referred to as the host:port designation of ESPE 600executing at ESP device 102.

Referring to FIG. 7, a first ESP system 100 a may include ESP device102, publishing device 200, an event subscribing device A 300 a, anevent subscribing device B 300 b, and an event subscribing device C 300c. Input event streams are output to ESP device 102 by publishing device200. In alternative embodiments, the input event streams may be createdby a plurality of publishing devices of event publishing systems 104.The plurality of publishing devices of event publishing systems 104further may publish event streams to another ESP device 102. The one ormore continuous queries 604 instantiated by ESPE 600 analyze and processthe input event streams to form output event streams output to eventsubscribing device A 300 a, event subscribing device B 300 b, and eventsubscribing device C 300 c. First ESP system 100 a may include a greateror a fewer number of event subscribing devices of event subscribingsystems 106.

Publish-subscribe is a message-oriented interaction paradigm based onindirect addressing. Processed data recipients specify their interest inreceiving information from ESPE 600 by subscribing to specific classesof events, while information sources publish events to ESPE 600 withoutdirectly addressing the receiving parties. ESPE 600 coordinates theinteractions and processes the data. In some cases, the data sourcereceives confirmation that the published information has been receivedby a data recipient.

A publish/subscribe API may be described as a library that enables anevent publisher, such as publishing device 200, to publish event streamsinto ESPE 600 or an event subscriber, such as event subscribing device A300 a, event subscribing device B 300 b, and event subscribing device C300 c, to subscribe to event streams from ESPE 600. For illustration,one or more publish/subscribe APIs may be defined. As an example, aversion of the SAS ESP Engine offered by SAS Institute Inc. can providea C++ publish/subscribe API and a Java publish/subscribe API. Using thepublish/subscribe API, event publishing application 224 may publishevent streams into a running event stream processor project sourcewindow of ESPE 600, and event subscription application 324 may subscribeto an event stream processor project source window of ESPE 600.

The publish/subscribe API provides cross-platform connectivity andendianness compatibility between ESP application 416 and other networkedapplications, such as event publishing application 224 instantiated atpublishing device 200, and event subscription application 324instantiated at one or more of event subscribing device A 300 a, eventsubscribing device B 300 b, and event subscribing device C 300 c.

Referring to FIG. 5, operation 506 initializes the publish/subscribecapability of ESPE 600. In an operation 508, the one or more projects602 are started. The one or more started projects may run in thebackground on ESP device 102.

In an operation 510, an event block object is received from one or morecomputing device of the event publishing systems 104, for example, frompublishing device 200. For illustration, referring to FIG. 8, an ESPsubsystem 800 is shown interfacing between publishing device 200 andevent subscribing device A 300 a, event subscribing device B 300 b, andevent subscribing device C 300 c in accordance with an illustrativeembodiment. ESP subsystem 800 may or may not be persistent. In theillustrative embodiment, ESP subsystem 800 includes a publishing client802, ESPE 600, a subscribing client A 804, a subscribing client B 806,and a subscribing client C 808. Publishing client 802 is started byevent publishing application 224 executing at publishing device 200using the publish/subscribe API. Subscribing client A 804 is started byan event subscription application A 324 a executing at event subscribingdevice A 300 a using the publish/subscribe API. Subscribing client B 806is started by an event subscription application B 324 b executing atevent subscribing device B 300 b using the publish/subscribe API.Subscribing client C 808 is started by an event subscription applicationC 324 c executing at event subscribing device C 300 c using thepublish/subscribe API.

An event block object containing one or more event objects is injectedinto a source window of the one or more source windows 606 from aninstance of event publishing application 224. The event block object isgenerated, for example, by event publishing application 224 and isreceived by publishing client 802. A unique ID is maintained as theevent block object is passed between the one or more source windows 606and/or the one or more derived windows 608 of ESPE 600, and tosubscribing client A 804, subscribing client B 806, and subscribingclient C 808 and to event subscription application A 324 a, eventsubscription application B 324 b, and event subscription application C324 c. Publishing client 802 may further generate and include a uniqueembedded transaction ID in the event block object as the event blockobject is processed by a continuous query, as well as the unique ID thatpublishing device 200 assigned to the event block object.

In an operation 512, the event block object is processed through the oneor more continuous queries 604. In an operation 514, the processed eventblock object is output to one or more computing devices of the eventsubscribing systems 106. For example, subscribing client A 804,subscribing client B 806, and subscribing client C 808 send the receivedevent block object to event subscription application A 324 a, eventsubscription application B 324 b, and event subscription application C324 c, respectively.

ESPE 600 maintains the event block containership aspect of the receivedevent blocks from when the event block is published into a source windowand works its way through the directed graph defined by the one or morecontinuous queries 604 with the various event translations before beingoutput to subscribers. Subscribers can correlate a group of subscribedevents back to a group of published events by comparing the unique ID ofthe event block object that a publisher, such as publishing device 200,attached to the event block object with the event block ID received bythe subscriber.

In an operation 516, a determination is made concerning whether or notprocessing is stopped. If processing is not stopped, processingcontinues in operation 510 to continue receiving the one or more eventstreams containing event block objects from the one or more computingdevices of the event publishing systems 104. If processing is stopped,processing continues in an operation 518. In operation 518, the startedprojects are stopped. In operation 520, ESPE 600 is shutdown.

Referring to FIG. 9, example operations associated with event publishingapplication 224 are described. Additional, fewer, or differentoperations may be performed depending on the embodiment. The order ofpresentation of the operations of FIG. 9 is not intended to be limiting.

In an operation 900, ESPE 600 is queried, for example, to discoverprojects 602, continuous queries 604, windows 606,608, window schema,and window edges currently running in ESPE 600. The engine name andhost/port to ESPE 600 may be provided as an input to the query and alist of strings may be returned with the names to the projects 602, tothe continuous queries 604, to the windows 606,608, to the windowschema, and/or to the window edges of currently running projects on ESPE600. The host is associated with a host name or Internet Protocol (IP)address of ESP device 102. The port is the port number provided when thepub/sub capability is initialized by ESPE 600. The engine name is thename of ESPE 600. The engine name of ESPE 600 and host/port to ESPdevice 102 may be read from a storage location on computer-readablemedium 210, may be provided on a command line, or otherwise input to ordefined by event publishing application 224 as understood by a person ofskill in the art.

In an operation 902, publishing services are initialized. In anoperation 904, the initialized publishing services are started, whichmay create a publishing client, such as publishing client 802, for theinstantiated event publishing application 224. The publishing client,such as publishing client 802, performs the various pub/sub activitiesfor the instantiated event publishing application 224. For example, astring representation of a URL to ESPE 600 is passed to a “Start”function. For example, the URL may include the host:port designation ofESPE 600 executing at ESP device 102, a project of the projects 602, acontinuous query of the continuous queries 604, and a window of thesource windows 606. The “Start” function may validate and retain theconnection parameters for a specific publishing client connection andreturn a pointer to the publishing client. For illustration, the URL maybe formatted as “dfESP://<host>:<port>/<project name>/<continuous queryname>/<window name>”. If event publishing application 224 is publishingto more than one source window of ESPE 600, the initialized publishingservices may be started to each source window using the associated names(project name, continuous query name, window name).

In an operation 906, a connection is made between event publishingapplication 224 and ESPE 600 for each source window to which data ispublished. To make the connection, the pointer to the created publishingclient may be passed to a “Connect” function and a mostly non-busy waitloop created to wait for receipt of event block objects from eventpublishing application 224. If event publishing application 224 ispublishing to more than one source window of ESPE 600, a connection maybe made to each started window using the pointer returned for therespective “Start” function call.

In an operation 908, an event block object is created by eventpublishing application 224. In an operation 910, the created event blockis published to ESPE 600 using the pointer returned for the respective“Start” function call to the appropriate source window. Event publishingapplication 224 passes the created event block to publishing client 802,where the unique ID field in the event block object has been set byevent publishing application 224 possibly after being requested frompublishing client 802. In an illustrative embodiment, event publishingapplication 224 may wait to begin publishing until a “Ready” callbackhas been received from publishing client 802. The event block object isinjected into the source window, continuous query, and projectassociated with the started publishing client.

In an operation 912, a determination is made concerning whether or notprocessing is stopped. If processing is not stopped, processingcontinues in operation 908 to continue creating and publishing eventblock objects. If processing is stopped, processing continues in anoperation 914. In operation 914, the connection made between eventpublishing application 224 and ESPE 600 through the publishing client isdisconnected, and each started publishing client is stopped.

Referring to FIG. 10, example operations associated with eventsubscription application 324 are described. Additional, fewer, ordifferent operations may be performed depending on the embodiment. Theorder of presentation of the operations of FIG. 10 is not intended to belimiting.

Similar to operation 900, in an operation 1000, ESPE 600 is queried, forexample, to discover names of projects 602, of continuous queries 604,of windows 606,608, of window schema, and of window edges currentlyrunning in ESPE 600. The host name of ESP device 102, the engine name ofESPE 600, and the port number opened by ESPE 600 are provided as aninput to the query and a list of strings may be returned with the namesto the projects 602, continuous queries 604, windows 606,608, windowschema, and/or window edges.

In an operation 1002, subscription services are initialized. In anoperation 1004, the initialized subscription services are started, whichmay create a subscribing client, such as subscribing client A 804, onbehalf of event subscription application 324 at subscribing device 300.The subscribing client, such as subscribing client A 804, performs thevarious pub/sub activities for event subscription application 324. Forexample, a URL to ESPE 600 may be passed to a “Start” function. The“Start” function may validate and retain the connection parameters for aspecific subscribing client connection and return a pointer to thesubscribing client. For illustration, the URL may be formatted as“dfESP://<host>:<port>/<project name>/<continuous query name>/<windowname>”.

In an operation 1006, a connection is made between event subscriptionapplication 324 and ESPE 600 through the created subscribing client. Tomake the connection, the pointer to the created subscribing client maybe passed to a “Connect” function and a mostly non-busy wait loopcreated to wait for receipt of event block objects.

In an operation 1008, an event block object is received by eventsubscription application 324.

In an operation 1010, a determination is made concerning whether or notprocessing is stopped. If processing is not stopped, processingcontinues in operation 1008 to continue receiving event block objects.If processing is stopped, processing continues in an operation 1012. Inoperation 1012, the connection made between event subscriptionapplication 324 and ESPE 600 through the subscribing client isdisconnected, and the subscribing client is stopped.

Referring to FIG. 11, a second ESP system 1100 is shown in accordancewith an illustrative embodiment. Second ESP system 1100 may include ESPdevice 102, event publishing systems 104, event subscribing systems 106,an in-messaging network device 1102, and an out-messaging network device1104. For illustration, event publishing systems 104 may include apublishing device A 200 a, a publishing device B 200 b, . . . , and apublishing device N 200 n. Event publishing systems 104 publish data toESP device 102 through in-messaging network device 1102. In-messagingnetwork device 1102 receives events published by event publishingsystems 104 and injects the received events into the appropriate sourcewindow of ESPE 600.

For illustration, event subscribing systems 106 may include eventsubscribing device A 300 a, event subscribing device B 300 b, . . . ,and an event subscribing device N 300 n. The event subscribing systems106 subscribe to and receive the published data through out-messagingnetwork device 1104 after processing by ESPE 600. Out-messaging networkdevice 1104 receives events from ESPE 600 and publishes the events toevent subscribing systems 106. In-messaging network device 1102 andout-messaging network device 1104 may be implemented in the same ordifferent devices as understood by a person of skill in the art. Thoughnot shown, network 108 may be used to support communication between oneor more components of second ESP system 1100.

In-messaging network device 1102 and out-messaging network device 1104provide a message network. For example, the message network may beimplemented as a data fabric configured to support a large volume ofpossibly time-sensitive and dynamic message flows. Example products andvendors of in-messaging network device 1102 and out-messaging networkdevice 1104 may include the Tervela© Message Switch™ (TMX), the TervelaProvisioning and Management (TPM) system, and the Tervela PersistenceEngine (TPE) offered by Tervela Inc. of New York, N.Y., USA, SolaceMessage Routers offered by Solace Systems of Ottawa, Ontario, CA, andRabbitMQ™ offered by Pivotal Software, Inc. of London, UK.

In-messaging network device 1102 routes messages from event publishingapplication 224 executing at event publishing systems 104 to ESPE 600executing at ESP device 102. Out-messaging network device 1104 routesmessages from ESPE 600 executing at ESP device 102 to event subscriptionapplication 324 executing at event subscribing systems 106. In-messagingnetwork device 1102 and out-messaging network device 1104 further maystore information and message traffic within the respective messagenetwork.

Referring to FIG. 12, ESP device 102 further may include an in-messagingnetwork connector 1200 and an out-messaging network connector 1202 inaccordance with an illustrative embodiment. In-messaging networkconnector 1200 performs operations associated with connecting toin-messaging network device 1102, receiving an event block object fromin-messaging network device 1102, and publishing the received eventblock object to a source window of the source windows 606 of ESPE 600.The operations may be implemented using hardware, firmware, software, orany combination of these methods. Referring to the example embodiment ofFIG. 12, in-messaging network connector 1200 is implemented in software(involving computer-readable and/or computer-executable instructions)stored in third computer-readable medium 410 and accessible by thirdprocessor 412 for execution of the instructions that embody theoperations of in-messaging network connector 1200.

ESP application 416 and in-messaging network connector 1200 may beintegrated in various manners as understood by a person of skill in theart. In-messaging network connector 1200 may be written using one ormore programming languages, assembly languages, scripting languages,etc. For illustration, in-messaging network connector 1200 may beimplemented as a plug-in that is an in-process class of ESP application416.

Out-messaging network connector 1202 performs operations associated withconnecting to out-messaging network device 1104, receiving an eventblock object from ESPE 600 after processing by ESPE 600, and publishingthe received event block object to out-messaging network device 1104.The operations may be implemented using hardware, firmware, software, orany combination of these methods. Referring to the example embodiment ofFIG. 12, out-messaging network connector 1202 is implemented in software(involving computer-readable and/or computer-executable instructions)stored in third computer-readable medium 410 and accessible by thirdprocessor 412 for execution of the instructions that embody theoperations of out-messaging network connector 1202.

ESP application 416 and out-messaging network connector 1202 may beintegrated in various manners as understood by a person of skill in theart. Out-messaging network connector 1202 may be written using one ormore programming languages, assembly languages, scripting languages,etc. For illustration, out-messaging network connector 1202 may beimplemented as a plug-in that is an in-process class of ESP application416.

ESP application 416 may be modified to execute as part of second ESPsystem 1100. Referring to FIG. 13, further example operations associatedwith ESP application 416 are described. Additional, fewer, or differentoperations may be performed depending on the embodiment. The order ofpresentation of the operations of FIG. 13 is not intended to belimiting.

Similar to operation 500, in an operation 1300, ESP application 416defines and starts ESPE 600 at ESP device 102. Similar to operation 502,in an operation 1302, the engine container is created. Similar tooperation 504, in an operation 1304, the one or more continuous queries604 are instantiated by ESPE 600 as a model.

Similar to operation 508, in an operation 1308, the one or more projects602 are started.

In an operation 1310, in-messaging network connector 1200 is started atESP device 102. In an illustrative embodiment, in-messaging networkconnector 1200 may be started as part of operation 1308. If connectororchestration is configured, in-messaging network connector 1200 may notstart until another connector has started or finished. A differentin-messaging network connector 1200 may be started for each sourcewindow of the source windows 606 to handle publications to each sourcewindow from in-messaging network device 1102. In an illustrativeembodiment, in-messaging network device 1102 may base it'spublish/subscribe capability on topics. To support topics, a topic namemay be mapped to a source window of the source windows 606 of ESPE 600by in-messaging network connector 1200. To isolate publish flows fromsubscribe flows to the same source window and ensure that the eventblock objects flow in one direction, the topic name may be appended withan “in” designator, such as “I”, “in”, etc.

Each started in-messaging network connector 1200 may operate as a clientof in-messaging network device 1102. Connection information forconnecting to in-messaging network device 1102 may be input toin-messaging network connector 1200 by ESP application 416 as part ofthe start of in-messaging network connector 1200, may be stored indatabase 414 and accessed by in-messaging network connector 1200, or mayotherwise be input to or defined by in-messaging network device 1102 asunderstood by a person of skill in the art. Additional information inputto in-messaging network connector 1200 may include the engine name ofESPE 600, the host name of ESP device 102, and the port number opened byESPE 600.

For illustration, when in-messaging network device 1102 includes themessage network offered by Tervela Inc., the connection information mayinclude an appliance name, a client user name, a client password, and ahost name or IP address of in-messaging network device 1102. Theappliance name may define a client name associated with a Tervelaguaranteed delivery context and may be unique among the startedin-messaging network connectors 1200. The client user name may define auser name defined in the Tervela TPM. The client password may define apassword associated with the client user name. The host name or IPaddress may define the host name or IP address of a primary Tervela TMX.The host name or IP address of in-messaging network device 1102, theclient user name, and the client password may be used to connect eachstarted in-messaging network connector 1200 to in-messaging networkdevice 1102.

Each started in-messaging network connector 1200 may connect to themessage network offered by Tervela Inc. by publishing a message to atopic defined using the appliance name. As an example, the topic may bedefined as “SAS.META.appliance name”. The message may include the enginename of ESPE 600, the host:port designation of ESPE 600 executing at ESPdevice 102, a project name of the projects 602, a continuous query nameof the continuous queries 604, a source window name of the sourcewindows 606, and a source window schema associated with in-messagingnetwork connector 1200. The host:port field may be substituted by theengine name in topic strings used on the message network. Forillustration, the topic name may be formatted as “SAS.ENGINES.enginename.project name.continuous query name.window name.IN” using themessage network offered by Tervela Inc where engine name is the enginename of ESPE 600.

For further illustration, when in-messaging network device 1102 includesthe message network offered by Solace Systems, the host:port ofin-messaging network device 1102, a client user name, a client password,and a virtual private network (VPN) name may be included in theconnection information. The topic name may be formatted as“host:port/project name/continuous query name/window name/I” wherehost:port is the host:port designation of ESPE 600 executing at ESPdevice 102. The host:port of in-messaging network device 1102, theclient user name, and the client password may be used to connect eachstarted in-messaging network connector 1200 to in-messaging networkdevice 1102.

Each started in-messaging network connector 1200 connects toin-messaging network device 1102 with the topic name associated with therespective source window of the source windows 606. Event publishingapplication 224 executing at event publishing systems 104 may continueto use the ESP URL format that includes the host:port information asdiscussed with reference to FIG. 9. No publish/subscribe server mayexist, so host:port may not be interpreted literally. Instead, it may beoverloaded to identify ESPE 600 executing at ESP device 102. The enginename of ESPE 600 may be mapped to the host:port designation of ESPE 600executing at ESP device 102 in a message sent by in-messaging networkconnector 1200. The topic name used in communications with in-messagingnetwork device 1102 may be based on the string representation of the URLto ESPE 600. A event publishing systems 104 and event subscribingsystems 106 know the host:port information from the URL, and substitutehost:port information with the engine name in the topic name used incommunications with in-messaging network device 1102.

Messaging performed by the message network offered by Tervela Inc. mayuse the Tervela guaranteed delivery mode. Messages may be persisted to aTervela TPE appliance. When each started in-messaging network connector1200 connects to in-messaging network device 1102, the connector 1200may receive messages already published to the associated topic name overa predefined time period to enable the started in-messaging networkconnector 1200 to catch up with messages sent during the predefined timeperiod. In-messaging network connector 1200 may define the time period.An example time period may be 8 hours though any time period may bedefined.

For further illustration, when in-messaging network device 1102 includesthe message network offered by Solace Systems, each started in-messagingnetwork connector 1200 may subscribe to the topic “host:port/M”, wherehost:port is the host:port designation of ESPE 600 executing at ESPdevice 102, which enables the started in-messaging network connector1200 to receive query requests to ESPE 600 associated with thathost:port combination.

Run-time libraries associated with in-messaging network device 1102 maybe installed on ESP device 102 to support connectivity betweenin-messaging network connector 1200 and in-messaging network device1102.

Similar to operation 1310, in an operation 1312, out-messaging networkconnector 1202 is started at ESP device 102. In an illustrativeembodiment, out-messaging network connector 1202 may be started as partof operation 1308. If connector orchestration is configured,out-messaging network connector 1202 may not start until anotherconnector has started or finished. A different out-messaging networkconnector 1202 may be started for each source window of the sourcewindows 606 to handle subscription to each source window byout-messaging network device 1104. Similar to in-messaging networkdevice 1102, in an illustrative embodiment, out-messaging network device1104 may base it's publish/subscribe capability on topics. To supporttopics, a topic name may be mapped to a source window of the sourcewindows 606 of ESPE 600 by out-messaging network connector 1202. Toisolate publish flows from subscribe flows to the same source window andensure that the event block objects flow in one direction, the topicname may be appended with an “out” designator, such as “O”, “out”, etc.

Each started out-messaging network connector 1202 may operate as aclient of out-messaging network device 1104. Connection information forconnecting to out-messaging network device 1104 may be input toout-messaging network connector 1202 by ESP application 416 as part ofthe start of out-messaging network connector 1202, may be stored indatabase 414 and accessed by out-messaging network connector 1202, ormay be otherwise input to or defined by out-messaging network device1104 as understood by a person of skill in the art. Additionalinformation input to out-messaging network connector 1202 may includethe engine name of ESPE 600, the host name of ESP device 102, and theport number opened by ESPE 600.

For illustration, when out-messaging network device 1104 includes themessage network offered by Tervela Inc., the connection information mayinclude an appliance name, a client user name, a client password, and ahost name or IP address of out-messaging network device 1104. Theappliance name may define a client name associated with a Tervelaguaranteed delivery context and may be unique among the startedout-messaging appliance connectors 1202. The client user name may definea user name defined in the Tervela TPM. The client password may define apassword associated with the client user name. The host name or IPaddress may define the host name or IP address of a primary Tervela TMX.The host name or IP address of out-messaging network device 1104, theclient user name, and the client password may be used to connect eachstarted out-messaging network connector 1202 to out-messaging networkdevice 1104.

Each started out-messaging network connector 1202 may connect to themessage network offered by Tervela Inc. by publishing a message to atopic defined using the appliance name. As an example, the topic may bedefined as “SAS.META.appliancename”. The message may include the enginename of ESPE 600, the host:port designation of ESPE 600 executing at ESPdevice 102, a project name of the projects 602, a continuous query nameof the continuous queries 604, a source window name of the sourcewindows 606, and a source window schema associated with the connector.The host:port field may be substituted by the engine name in topicstrings used on the message network. For illustration, the topic namemay be formatted as “SAS.ENGINES.engine name.project name.continuousquery name.window name.OUT” using the message network offered by TervelaInc.

For further illustration, when out-messaging network device 1104includes the message network offered by Solace Systems, the host:port ofout-messaging network device 1104, a client user name, a clientpassword, and a virtual private network (VPN) name may be included inthe connection information. The topic name may be formatted as“host:port/project name/continuous query name/window name/O” wherehost:port is the host:port designation of ESPE 600 executing at ESPdevice 102. The host:port of out-messaging network device 1104 is usedto connect each started out-messaging network connector 1202 toout-messaging network device 1104.

Each started out-messaging network connector 1202 connects toout-messaging network device 1104 with the topic name associated withthe source window of the source windows 606. Event subscriptionapplication 324 executing at event subscribing systems 106 may continueto use the ESP URL format that includes the host:port information asdiscussed with reference to FIG. 10. No publish/subscribe server mayexist, so host:port may not be interpreted literally. Instead, it may beoverloaded to identify ESPE 600. The engine name of ESPE 600 may bemapped to the host:port designation of ESPE 600 executing at ESP device102 by out-messaging network connector 1202. The topic name used incommunications with out-messaging network device 1104 may be based onthe string representation of the URL to ESPE 600.

For further illustration, when out-messaging network device 1104includes the message network offered by Solace Systems, each startedout-messaging network connector 1202 may subscribe to the topic“host:port/M” where host:port is the host:port designation of ESPE 600executing at ESP device 102, which enables the started out-messagingnetwork connector 1202 to receive query requests to ESPE 600 associatedwith that host:port combination.

Run-time libraries associated with out-messaging network device 1104 maybe installed on ESP device 102 to support connectivity betweenout-messaging network connector 1202 and out-messaging network device1104.

An event block object containing one or more event objects is injectedinto a source window of the one or more source windows 606 by aninstance of event publishing application 224. The injected event blockobject is received by in-messaging network device 1102. In-messagingnetwork device 1102 encapsulates the received event block object in awrapper for transmission through in-messaging network device 1102 to thestarted in-messaging network connector 1200 without modification.

Similar to operation 510, in an operation 1314, the event block objectreceived by the started in-messaging network connector 1200 is receivedby ESPE 600. The transmission of the event block object is coordinatedusing the topic name created based on the host:port/projectname/continuous query name/window name.

Similar to operation 512, in an operation 1316, the event block objectis processed through the one or more continuous queries 604. Similar tooperation 514, in an operation 1318, the event block object is output tothe started out-messaging network connector 1202. Out-messaging networkconnector 1202 sends the event block object to out-messaging networkdevice 1104 that receives the event block object and wraps the receivedevent block object for transmission through out-messaging network device1104 to the one or more computing devices of the event subscribingsystems 106.

Again, ESPE 600 maintains the event block containership aspect of thereceived event blocks from when the event block is published into asource window and works its way through the directed graph with thevarious event translations before being output to subscribers.Subscribers can correlate a group of subscribed events back to a groupof published events by comparing the unique ID of the event block objectthat a publisher, such as publishing device 200, attached to the eventblock object with the event block ID received by the subscriber.

Similar to operation 516, in an operation 1320, a determination is madeconcerning whether or not processing is stopped. If processing is notstopped, processing continues in operation 1314 to continue receivingevent block objects from the one or more computing devices of the eventpublishing systems 104 through in-messaging network device 1102 to theassociated source window of source windows 606. If processing isstopped, processing continues in an operation 1322. In operation 1322,the started projects, in-messaging network connector 1200, andout-messaging network connector 1202 are stopped. Similar to operation520, in an operation 1324, ESPE 600 is shutdown.

Referring to FIG. 14, example operations associated with eventpublishing application 224 are described. Event publishing application224 may be defined to execute in second ESP system 1100. Additional,fewer, or different operations may be performed depending on theembodiment. The order of presentation of the operations of FIG. 14 isnot intended to be limiting.

In an operation 1400, a connection is made to in-messaging networkdevice 1102 with predefined connection information. The predefinedconnection information may be consistent with that used by in-messagingnetwork connector 1200. For illustration, the predefined connectioninformation may be stored in computer-readable medium 210. As anexample, a function call may indicate a type of message network ofin-messaging network device 1102, and a configuration file may be storedin computer-readable medium 210 that includes the predefined connectioninformation.

For illustration, when in-messaging network device 1102 includes themessage network offered by Tervela Inc., the connection information mayinclude the appliance name, the client user name, the client password,and the host name or IP address of in-messaging network device 1102. Thehost name or IP address of in-messaging network device 1102, the clientuser name, and the client password may be used to connect toin-messaging network device 1102. For further illustration, whenin-messaging network device 1102 includes the message network offered bySolace Systems, the host:port of in-messaging network device 1102, theclient user name, the client password, and the VPN name may be includedin the connection information. The host:port of in-messaging networkdevice 1102 is used to connect to in-messaging network device 1102.

Similar to operation 900, in an operation 1402, ESPE 600 is queried, forexample, to discover projects 602, continuous queries 604, windows606,608, window schema, and window edges currently running in ESPE 600.The engine name of ESPE 600 and the host:port designation for ESPE 600executing at ESP device 102 are provided as an input to the query and alist of strings may be returned with the names to the projects 602,continuous queries 604, windows 606,608, window schema, and windowedges.

In an operation 1404, publishing services are initialized as needed. Forexample, publishing services may not be used by in-messaging networkdevice 1102.

In an operation 1406, the initialized publishing services are started.The publishing client, such as publishing client 802, performs thevarious pub/sub activities for the instantiated event publishingapplication 224. For example, a string representation of the URL to ESPE600 is passed to a “Start” function. For example, the URL may includethe host:port designation for ESPE 600 executing at ESP device 102, aproject of the projects 602, a continuous query of the continuousqueries 604, and a window of the source windows 606. The “Start”function may validate and retain the connection parameters for aspecific publishing client connection and return a dedicated socketconnection to the publishing client. For illustration, the URL may beformatted as “dfESP://<host>:<port>/<project name>/<continuous queryname>/<window name>”. If event publishing application 224 is publishingto more than one source window of ESPE 600, the initialized publishingservices may be started to each source window using the associated names(project name, continuous query name, window name).

Similar to operation 908, in an operation 1408, an event block object iscreated by event publishing application 224. Similar to operation 910,in an operation 1410, the created event block is published to ESPE 600through in-messaging network device 1102 using the pointer returned forthe respective “Start” function call to the appropriate source window.

Similar to operation 912, in an operation 1412, a determination is madeconcerning whether or not processing is stopped. If processing is notstopped, processing continues in operation 1408 to continue creating andpublishing event block objects. If processing is stopped, processingcontinues in an operation 1414. Similar to operation 914, in operation1414, the connection made between event publishing application 224 andin-messaging network device 1102 is disconnected, and each startedpublishing client is stopped.

Referring to FIG. 15, example operations associated with eventsubscription application 324 are described. Event subscriptionapplication 324 may be defined to execute in second ESP system 1100.Additional, fewer, or different operations may be performed depending onthe embodiment. The order of presentation of the operations of FIG. 15is not intended to be limiting.

In an operation 1500, a connection is made to out-messaging networkdevice 1104 with predefined connection information. The predefinedconnection information may be consistent with that used by out-messagingnetwork connector 1202. For illustration, the predefined connectioninformation may be stored in second computer-readable medium 310. As anexample, a function call may indicate a type of message network ofout-messaging network device 1104, and a configuration file may bestored in second computer-readable medium 310 that includes thepredefined connection information.

For illustration, when out-messaging network device 1104 includes themessage network offered by Tervela Inc., the connection information mayinclude the appliance name, the client user name, the client password,and the host name or IP address of out-messaging network device 1104.The host name or IP address of out-messaging network device 1104, theclient user name, and the client password may be used to connect toout-messaging network device 1104. For further illustration, whenout-messaging network device 1104 includes the message network offeredby Solace Systems, the host:port of out-messaging network device 1104,the client user name, the client password, and the VPN name may beincluded in the connection information. The host:port of out-messagingnetwork device 1104 is used to connect to out-messaging network device1104.

Similar to operation 1000, in an operation 1502, ESPE 600 is queried,for example, to discover projects 602, continuous queries 604, windows606,608, window schema, and window edges currently running in ESPE 600.The engine name of ESPE 600 and the host:port designation for ESPE 600executing at ESP device 102 are provided as an input to the query and alist of strings may be returned with the names to the projects 602,continuous queries 604, windows 606,608, window schema, and windowedges.

In an operation 1504, subscription services are initialized as needed.For example, subscription services may not be used by out-messagingnetwork device 1104.

In an operation 1506, the initialized subscription services are started,which creates a subscribing client, such as subscribing client A 804, onbehalf of event subscription application 324 at subscribing device 300.The subscribing client, such as subscribing client A 804, performs thevarious pub/sub activities for event subscription application 324. Forexample, a URL to ESPE 600 may be passed to a “Start” function. The“Start” function may validate and retain the connection parameters for aspecific subscribing client connection and return a pointer to thesubscribing client. For illustration, the URL may be formatted as“dfESP://<host>:<port>/<project name>/<continuous query name>/<windowname>”.

Similar to operation 1008, in an operation 1508, an event block objectis received by event subscription application 324.

Similar to operation 1010, in an operation 1510, a determination is madeconcerning whether or not processing is stopped. If processing is notstopped, processing continues in operation 1508 to continue receivingevent block objects. If processing is stopped, processing continues inan operation 1512. In operation 1512, the connection made between eventsubscription application 324 and out-messaging network device 1104 isdisconnected, and the subscribing client is stopped.

Referring to FIG. 16, a third ESP system 1600 is shown in accordancewith an illustrative embodiment. Third ESP system 1600 may include aplurality of ESP devices 1602, event publishing systems 104, eventsubscribing systems 106, in-messaging network device 1102, andout-messaging network device 1104. The plurality of ESP devices 1602create a failover ESP system by providing at least one additional ESPdevice as a backup if a currently active ESP fails as described furtherbelow. Having a backup insures that third ESP system 1600 continues tooperate even when the currently active ESP fails. For illustration, theplurality of ESP devices 1602 may include an ESP A 102 a, an ESP B 102b, ESP C 102 c, . . . , and an ESP N 102 n.

Though not shown, network 108 may be used to support communicationbetween one or more components of third ESP system 1600. For example,the plurality of ESP devices 1602 may be located in a single room oradjacent rooms, in a single facility, and/or may be distributedgeographically from one another. ESP device 102 is an example device ofthe plurality of ESP devices 1602.

Each of the plurality of ESP devices 1602 may perform the operationsdescribed with reference to FIG. 13 except that only one of theplurality of ESP devices 1602 is an active ESP device that is publishingreceived event block objects to out-messaging network device 1104. Eachof the plurality of ESP devices 1602 may receive published event blockobjects from in-messaging network device 1102.

In the illustrative embodiment of FIG. 16, ESP device B 102 b isindicated, using a solid line, as the active ESP device that ispublishing to out-messaging network device 1104. Though the remainingESP devices of the plurality of ESP devices 1602 are connected toout-messaging network device 1104 using their own out-messaging networkconnector 1202, they are not publishing to out-messaging network device1104. The remaining ESP devices of the plurality of ESP devices 1602 maybe called a failover group. The determination of which of the pluralityof ESP devices 1602 is the active ESP device is determined upon initialconnection by the associated out-messaging network connector 1202 toout-messaging network device 1104 and is maintained until the active ESPdevice fails. Out-messaging network connector 1202 running at each ESPdevice of the plurality of ESP devices 1602 coordinates without-messaging network device 1104 to determine the active ESP device.

Referring to FIG. 17, example operations associated with in-messagingnetwork connector 1200 are described. In-messaging network connectors1200 may be defined to execute in third ESP system 1600 for each sourcewindow of ESPE 600 and for each ESP device of the plurality of ESPdevices 1602 that is executing ESPE 600. Additional, fewer, or differentoperations may be performed depending on the embodiment. The order ofpresentation of the operations of FIG. 17 is not intended to belimiting.

In an operation 1700, a connection is made to in-messaging networkdevice 1102 by each in-messaging network connector 1200 of each of theplurality of ESP devices 1602 with the predefined connection informationas described with reference to operation 1310 of FIG. 13. For example,the predefined connection information may be stored in thirdcomputer-readable medium 410 or passed to in-messaging network connector1200 when in-messaging network connector 1200 is started by ESPE 600.The engine name of ESPE 600 running at each of the plurality of ESPdevices 1602 may be identical. Each in-messaging network connector 1200of each of the plurality of ESP devices 1602 may be active based on thesame set of topics, and may be configured with the same in-messagingnetwork device 1102 connection information. To synchronize, eachin-messaging network connector 1200 of each of the plurality of ESPdevices 1602 may initiate message flow at the same time, within-messaging network device 1102 purged of messages on related topics,and with the same initial event block object ID.

In an operation 1702, a query is received from in-messaging networkdevice 1102. In an operation 1704, a response to the query is sent toin-messaging network device 1102. For illustration, when out-messagingnetwork device 1104 includes the message network offered by SolaceSystems, each in-messaging network connector 1200 listens for metadatarequests on the topic named “host:port/M” where host:port is thehost:port designation of ESPE 600 executing at ESP device 102.In-messaging network device 1102 may send formatted messages on thistopic in request/reply fashion. The request messages may be sent usingdeliver-to-one to ensure that only one of the plurality of ESP devices1602 responds to the message.

For further illustration, when in-messaging network device 1102 includesthe message network offered by Tervela Inc., each in-messaging networkconnector 1200 may create a single cluster-wide inbox named “enginename_meta”, which includes the engine name of ESPE 600, and may publishmetadata information about special topic “SAS.META.host:port”, whichincludes the host:port designation of ESPE 600 executing at ESP device102. In-messaging network device 1102 may subscribe to this topic andsave the received metadata and engine mapping information. To process asubsequent query from publishing device 200, in-messaging network device1102 responds to the query with the requested information from the savedmetadata. In-messaging network device 1102 may derive the inbox nameusing the received host:port designation of ESPE 600 executing at ESPdevice 102 mapped to the engine name of ESPE 600 and send formattedmessages to the inbox in request/reply fashion.

In an operation 1706, the event block object is received by the startedin-messaging network connector 1200 from in-messaging network device1102. In an operation 1708, the received event block object is publishedto ESPE 600 based on the topic name that corresponds to a source windowname of ESPE 600. In an operation 1710, a determination is madeconcerning whether or not processing is stopped. If processing is notstopped, processing continues in operation 1706 to continue receivingthe event block objects from in-messaging network device 1102. Ifprocessing is stopped, processing continues in an operation 1712. Inoperation 1712, the connection to in-messaging network device 1102 isdisconnected, and in-messaging network connector 1200 is stopped.

Referring to FIG. 18, example operations associated with out-messagingnetwork connector 1202 are described. Out-messaging network connectors1202 may be defined to execute in third ESP system 1600 for each sourcewindow and for each ESP device of the plurality of ESP devices 1602.Additional, fewer, or different operations may be performed depending onthe embodiment. The order of presentation of the operations of FIG. 18is not intended to be limiting. Out-messaging network connectors 1202executing at each ESP device of the plurality of ESP devices 1602 inthird ESP system 1600 achieve a rapid and seamless failover of any ESPE600 running at the plurality of ESP devices 1602 without serviceinterruption or data loss.

In an operation 1800, a connection is made to out-messaging networkdevice 1104 by each out-messaging network connector 1202 of each of theplurality of ESP devices 1602 with the predefined connection informationdescribed with reference to operation 1312. For example, the predefinedconnection information may be stored in third computer-readable medium410 or passed to out-messaging network connector 1202 when out-messagingnetwork connector 1202 is started by ESPE 600.

Similar to operations 1702 and 1704, in an operation 1801, a query isreceived from out-messaging network device 1104, and a response to thequery is sent to out-messaging network device 1104.

In an operation 1802, the event block object is received by the startedout-messaging network connector 1202 from ESPE 600. In an operation1804, a determination is made concerning whether or not theout-messaging network connector 1202 received a notification indicatingthat the out-messaging network connector 1202 is associated with theactive ESP device. For example, whether out-messaging network connector1202 is associated with the active ESP device or a standby ESP device iscommunicated to out-messaging network connector 1202. The notificationmay be determined initially when each out-messaging network connector1202 of the plurality of ESP devices 1602 connect to out-messagingnetwork device 1104 and when a status of one or more of theout-messaging network connectors 1202 changes due to a failed ESP deviceor a new ESP device joining the plurality of ESP devices 1602. Whenout-messaging network connector 1202 is associated with a standby ESPdevice, the notification may indicate that out-messaging networkconnector 1202 is a standby or inactive connector.

For illustration, when out-messaging network device 1104 includes themessage network offered by Solace Systems, an exclusive messaging queuemay be shared among each out-messaging network connector 1202 of each ofthe plurality of ESP devices 1602. The exclusive messaging queue is usedto signal whether or not the ESP device of the plurality of ESP devices1602 is the active ESP device. No data may be published to the exclusivemessaging queue.

When out-messaging network device 1104 includes the message networkoffered by Solace Systems, ESP device active/standby status iscoordinated among the plurality of ESP devices 1602 using the followingmechanism. When each out-messaging network connector 1202 starts, theout-messaging network connector 1202 tries, as a consumer of theexclusive messaging queue, to bind to the exclusive messaging queuecreated for the plurality of ESP devices 1602. When out-messagingnetwork connector 1202 is the first to bind to the exclusive messagingqueue, it receives an active indicator from out-messaging network device1104 indicating that it is associated with the active ESP device. Asother out-messaging network connectors 1202 bind to the exclusivemessaging queue, they receive an inactive indicator from out-messagingnetwork device 1104 indicating that they are associated with an inactiveESP device of the plurality of ESP devices 1602. If the active ESPdevice fails or disconnects from out-messaging network device 1104, anext out-messaging network connector 1202 receives the active indicatorfrom out-messaging network device 1104 indicating that it is nowassociated with the active ESP device. For example, the secondout-messaging network connector 1202 to connect to out-messaging networkdevice 1104 may be selected to receive the active indicator when theactive ESP device fails.

For further illustration, when out-messaging network device 1104includes the message network offered by Tervela Inc., ESP deviceactive/standby status may be coordinated among the plurality of ESPdevices 1602 using the following mechanism. When each out-messagingnetwork connector 1202 starts, each out-messaging network connector 1202attempts to create an inbox using the engine name of ESPE 600 for theinbox name making the inbox specific to the plurality of ESP devices1602. If successful, out-messaging network connector 1202 receives anactive indicator from out-messaging network device 1104 indicating thatit is associated with the active ESP device, and the out-messagingnetwork connector 1202 takes ownership of a system-wide guaranteeddelivery context. If the inbox already exists, the active ESP device hasalready been selected, and the remaining out-messaging applianceconnectors 1202 receive an inactive indicator from out-messaging networkdevice 1104 indicating that they are associated with an inactive ESPdevice of the plurality of ESP devices 1602. The remaining out-messagingappliance connectors 1202 connect to the inbox, and send an emptymessage to the inbox. The active out-messaging network connector 1202receives the empty messages from the standby out-messaging applianceconnectors 1202. A first responder of the remaining out-messagingappliance connectors 1202 may be selected by the active out-messagingnetwork connector 1202 as an active standby connector by responding tothe empty message of that out-messaging network connector 1202. Theactive out-messaging network connector 1202 may maintain a map of theother out-messaging appliance connectors 1202 and their status. If theactive out-messaging network connector 1202 receives notification of aninbox disconnect by the active standby connector, the activeout-messaging network connector 1202 notifies another standby connectorto become the active standby connector by responding to the emptymessage received from that out-messaging network connector 1202. Whenthe active ESP device fails, the inbox also fails, and out-messagingnetwork device 1104 sends a message to the inactive out-messagingappliance connectors 1202. When the active standby connector receivesthe message, the active standby connector becomes the activeout-messaging network connector 1202 associated with the active ESPdevice, and creates a new inbox as described above to which theremaining inactive out-messaging appliance connectors 1202 connect. Whenthe remaining standby connectors receive the message, they retain theirstandby status and send an empty message to the created new inbox.

If the notification is active in operation 1804, processing continues inan operation 1808. If the notification is not received in operation1804, processing continues in an operation 1806.

In operation 1806, the received event block object is stored to thirdcomputer-readable medium 410, and processing continue in an operation1816. For example, the received event block object may be stored in abuffer that holds a predefined number of received event block objects asunderstood by a person of skill in the art. When the buffer contains thepredefined number of received event block objects, the oldest eventblock object in the buffer is removed from the buffer before storing thereceived event block object.

In an operation 1808, a determination is made concerning whether or notthe active out-messaging network connector 1202 is associated with anewly active ESP device. A newly active ESP device is determined whenthe ESP device is switched from a standby status to the active status.On a subsequent iteration of operation 1808, the ESP device is not newlyactive because that status continues to be the active status. If theactive out-messaging network connector 1202 is associated with a newlyactive ESP device, processing continues in an operation 1810. If theactive out-messaging network connector 1202 is not associated with anewly active ESP device, processing continues in an operation 1814.

In operation 1810, an identifier of a last published event block objectis determined. For illustration, when out-messaging network device 1104includes the message network offered by Solace Systems, the activeout-messaging network connector 1202 determines the last published eventblock object from a last value queue maintained by out-messaging networkdevice 1104. The last value queue may have a depth of one message andcontain the last message published by the previously active ESP deviceon the topic to which the last value queue subscribed. The out-messagingnetwork connector 1202 associated with the newly active ESP device bindsto the last value queue as a browser, retrieves the last successfullypublished event block object published from the last value queue, savesits event block object ID, and disconnects from the last value queue.

For further illustration, when in-messaging network device 1102 includesthe message network offered by Tervela Inc., the active connectorqueries the system-wide guaranteed delivery context that it owns for theevent block object ID of the last successfully published event blockobject.

In an operation 1812, one or more event block objects received after thelast published event block object are selected from the buffer byidentifying any event block objects with an associated event blockobject ID that is greater than the event block object ID of the lastsuccessfully published event block object. In an operation 1813, theselected one or more event block objects and the event block objectreceived in operation 1802 are published to out-messaging network device1104, and processing continues in operation 1816.

In operation 1814, the received event block object is published toout-messaging network device 1104. In operation 1816, a determination ismade concerning whether or not processing is stopped. If processing isnot stopped, processing continues in operation 1802 to continuereceiving the event block objects from ESPE 600. If processing isstopped, processing continues in an operation 1818. In operation 1818,the connection to out-messaging network device 1104 is disconnected, andout-messaging network connector 1202 is stopped.

To guarantee that ESPE 600 executing on a rebooted ESP device can befully synchronized with the remaining plurality of ESP devices 1602, apersist/restore feature in “guaranteed” mode can be used. For example, astate of ESPE 600 may be periodically persisted by ESPE 600 of theplurality of ESP devices 1602. The persist of the state of ESPE 600 canbe triggered by ESPE 600 though this may generate redundant persistdata. As another example, the active out-messaging network connector1202 can trigger a persist by ESPE 600 executing at the active ESPdevice.

A location of the persist data may be the same for each ESPE 600executing at the plurality of ESP devices 1602 so that when a failed ESPdevice is rebooted and reconnected, the persist data can be used to getESPE 600 executing at the failed ESP device back to a state close to acurrent state of ESPE 600 executing at the remaining plurality of ESPdevices 1602. ESPE 600 executing at the failed ESP device can work without-messaging network device 1104 to receive event block objects afterthe persist data to fully catch up to the current state. Once caught up,ESPE 600 executing at the failed ESP device can register without-messaging network device 1104 as a standby dependent on the type ofout-messaging network device 1104 as discussed above.

Aspects of the current disclosure provide technical solutions totechnical problems, such as computing problems that arise when an ESPdevice fails which results in a complete service interruption andpotentially significant data loss. The data loss can be catastrophicwhen the streamed data is supporting mission critical operations such asthose in support of an ongoing manufacturing or drilling operation.Third ESP system 1600 achieves a rapid and seamless failover of ESPE 600running at the plurality of ESP devices 1602 without serviceinterruption or data loss thus significantly improving the reliabilityof an operational system that relies on the live or real-time processingof the data streams. The event publishing systems 104, the eventsubscribing systems 106, and each ESPE 600 not executing at a failed ESPdevice is not aware of or effected by the failed ESP device. Third ESPsystem 1600 may include thousands of event publishing systems 104 andevent subscribing systems 106. Some previous failover systems requiredthe event publishing systems 104 and the event subscribing systems 106to reattach to a new ESP resulting in system downtime and a loss ofdata. Third ESP system 1600 keeps the failover logic and awarenesswithin the boundaries of out-messaging network connector 1202 andout-messaging network device 1104.

In an illustrative embodiment, third ESP system 1600 may be configuredto operate with RabbitMQ™ provided by Pivotal Software, Inc. of London,United Kingdom. RabbitMQ™ is open source message broker software thatimplements the advanced message queuing protocol. For example,in-messaging network device 1102 and/or out-messaging network device1104 may be implemented using RabbitMQ™.

The word “illustrative” is used herein to mean serving as an example,instance, or illustration. Any aspect or design described herein as“illustrative” is not necessarily to be construed as preferred oradvantageous over other aspects or designs. Further, for the purposes ofthis disclosure and unless otherwise specified, “a” or “an” means “oneor more”. Still further, using “and” or “or” in the detailed descriptionis intended to include “and/or” unless specifically indicated otherwise.The illustrative embodiments may be implemented as a method, apparatus,or article of manufacture using standard programming and/or engineeringtechniques to produce software, firmware, hardware, or any combinationthereof to control a computer to implement the disclosed embodiments.

The foregoing description of illustrative embodiments of the disclosedsubject matter has been presented for purposes of illustration and ofdescription. It is not intended to be exhaustive or to limit thedisclosed subject matter to the precise form disclosed, andmodifications and variations are possible in light of the aboveteachings or may be acquired from practice of the disclosed subjectmatter. The embodiments were chosen and described in order to explainthe principles of the disclosed subject matter and as practicalapplications of the disclosed subject matter to enable one skilled inthe art to utilize the disclosed subject matter in various embodimentsand with various modifications as suited to the particular usecontemplated.

What is claimed is:
 1. A plurality of non-transitory computer-readablemedia configured to switch stream processing of an event block object,sent from a publishing device to a subscribing device, to a firstcomputing device from a third computing device that has failed, theplurality of non-transitory computer-readable media comprising: a firstnon-transitory computer-readable medium comprising firstcomputer-readable instructions stored thereon wherein, when the firstcomputer-readable instructions are executed by a first processor, thefirst computer-readable instructions cause the first computing device todetermine a first status of a first event stream processing engine(ESPE) executing at the first computing device as newly active; when thefirst status of the first ESPE is determined as newly active, todetermine a last published event block object identifier as anidentifier that uniquely identifies a last event block object publishedto an out-messaging network device; when the first status of the firstESPE is determined as newly active, to select a next event block objecthaving an event block object identifier that is greater than thedetermined last published event block object identifier from the firstnon-transitory computer-readable medium; when the first status of thefirst ESPE is determined as newly active, to publish the selected nextevent block object to the out-messaging network device; to receive afirst event block object from the first ESPE executing at the firstcomputing device, wherein the first event block object includes a uniqueidentifier of the first event block object; to determine a first statusof the first ESPE as active; and when the first status of the first ESPEis determined as active, to publish the received first event blockobject to the out-messaging network device; and a second non-transitorycomputer-readable medium comprising second computer-readableinstructions stored thereon wherein, when the second computer-readableinstructions are executed by a second processor, the secondcomputer-readable instructions cause a second computing device differentfrom the first computing device and from the third computing device toreceive the first event block object from a second ESPE executing at thesecond computing device, wherein the first event block object includesthe unique identifier of the first event block object; to determine afirst status of the second ESPE as standby; and when the first status ofthe second ESPE is determined as standby, to store the received firstevent block object in the second non-transitory computer-readablemedium.
 2. The plurality of non-transitory computer-readable media ofclaim 1, wherein a plurality of next event block objects is selected andpublished to the out-messaging network device.
 3. The plurality ofnon-transitory computer-readable media of claim 1, wherein the firstcomputer-readable instructions further cause the first computing deviceto establish a connection to the out-messaging network device usingconnection information.
 4. The plurality of non-transitorycomputer-readable media of claim 3, wherein the second computer-readableinstructions further cause the second computing device to establish asecond connection to the out-messaging network device using secondconnection information.
 5. The plurality of non-transitorycomputer-readable media of claim 4, wherein the connection informationis received from the first ESPE, and the second connection informationis received from the second ESPE.
 6. The plurality of non-transitorycomputer-readable media of claim 3, wherein the connection informationincludes a host name of the out-messaging network device and a portnumber for publishing the selected next event block object to theout-messaging network device.
 7. The plurality of non-transitorycomputer-readable media of claim 3, wherein the connection informationincludes an Internet protocol address of the out-messaging networkdevice.
 8. The plurality of non-transitory computer-readable media ofclaim 4, wherein, after establishing the second connection, the secondcomputer-readable instructions further cause the second computing deviceto receive, from the out-messaging network device, a published eventblock object previously published to the out-messaging network device.9. The plurality of non-transitory computer-readable media of claim 8,wherein the event block object previously published to the out-messagingnetwork device was published by the first computing device.
 10. Theplurality of non-transitory computer-readable media of claim 8, whereina plurality of published event block objects are received from theout-messaging network device, wherein the plurality of published eventblock objects were published to the out-messaging network device duringa predefined time period.
 11. The plurality of non-transitorycomputer-readable media of claim 4, wherein establishing the connectioncomprises attempting to create a first inbox with a first engine name ofthe first ESPE at the out-messaging network device, wherein establishingthe second connection further comprises attempting to create a secondinbox with a second engine name of the second ESPE at the out-messagingnetwork device, wherein the first engine name of the first ESPE isidentical to the second engine name of the second ESPE.
 12. Theplurality of non-transitory computer-readable media of claim 11, whereindetermining the first status of the first ESPE as newly active comprisesreceiving an active indicator from the out-messaging network device inresponse to the attempt to create the first inbox.
 13. The plurality ofnon-transitory computer-readable media of claim 12, wherein, afterreceiving the active indicator from the out-messaging network device,the first computer-readable instructions further cause the firstcomputing device: to receive an empty message from the second computingdevice; in response to receiving the empty message, to select the secondESPE as an active standby ESPE; and to respond to the empty messagereceived from the second computing device.
 14. The plurality ofnon-transitory computer-readable media of claim 11, wherein determiningthe first status of the second ESPE as standby comprises receiving aninactive indicator from the out-messaging network device in response tothe attempt to create the second inbox.
 15. The plurality ofnon-transitory computer-readable media of claim 14, wherein, afterreceiving the inactive indicator from the out-messaging network device,the second computer-readable instructions further cause the secondcomputing device: to send an empty message to the first computingdevice; and to receive a response to the sent empty message from thefirst computing device indicating that the second ESPE is an activestandby ESPE.
 16. The plurality of non-transitory computer-readablemedia of claim 1, wherein, after publishing the selected next eventblock object to the out-messaging network device, the firstcomputer-readable instructions further cause the first computing device:to receive a second event block object from the first ESPE, wherein thesecond event block object includes a second unique identifier of thesecond event block object; to determine a second status of the firstESPE as active; and when the second status of the first ESPE isdetermined as active, to publish the received second event block objectto the out-messaging network device.
 17. The plurality of non-transitorycomputer-readable media of claim 1, wherein, before determining thefirst status of the first ESPE as newly active, the firstcomputer-readable instructions further cause the first computing device:to receive a second event block object from the first ESPE, wherein thesecond event block object includes a second unique identifier of thesecond event block object; to determine a second status of the firstESPE as standby; and when the second status of the first ESPE isdetermined as standby, to store the received second event block objectin the first non-transitory computer-readable medium.
 18. The pluralityof non-transitory computer-readable media of claim 1, wherein, beforedetermining the first status of the first ESPE as newly active, thefirst computer-readable instructions further cause the first computingdevice to receive an initial event block object from the first ESPE,wherein the initial event block object includes an initial uniqueidentifier of the initial event block object; and before determining thefirst status of the second ESPE as standby, the second computer-readableinstructions further cause the second computing device to receive theinitial event block object from the second ESPE.
 19. The plurality ofnon-transitory computer-readable media of claim 1, wherein an enginename of the first ESPE is identical to an engine name of the secondESPE.
 20. The plurality of non-transitory computer-readable media ofclaim 1, wherein, after storing the received first event block object inthe second non-transitory computer-readable medium, the secondcomputer-readable instructions further cause the second computing deviceto: receive a second event block object from the second ESPE, whereinthe second event block object includes a second unique identifier of thesecond event block object; determine a second status of the second ESPEas standby; compute a number of event block objects stored in the secondnon-transitory computer-readable medium; when the computed number ofevent block objects exceeds a threshold, remove an oldest event blockobject from the second non-transitory computer-readable medium; and whenthe second status of the second ESPE is determined as standby, store thereceived second event block object in the second non-transitorycomputer-readable medium.
 21. The plurality of non-transitorycomputer-readable media of claim 1, wherein determining the first statusof the first ESPE as newly active comprises receiving an activeindicator from the out-messaging network device after receiving astandby indicator from the out-messaging network device.
 22. Theplurality of non-transitory computer-readable media of claim 1, whereindetermining the last published event block object identifier comprises:binding to a last value queue established at the out-messaging networkdevice; and retrieving a last successfully published event block objectpublished from the last value queue.
 23. The plurality of non-transitorycomputer-readable media of claim 1, wherein determining the lastpublished event block object identifier comprises querying theout-messaging network device for the last published event block objectidentifier.
 24. The plurality of non-transitory computer-readable mediaof claim 1, wherein the selected next event block object is published toa topic that includes an engine name of the first ESPE.
 25. Theplurality of non-transitory computer-readable media of claim 1, whereindetermining the first status of the first computing device comprises:attempting to bind to an exclusive messaging queue established at theout-messaging network device; and receiving an active indicator from theout-messaging network device when the attempt to bind is successful. 26.The plurality of non-transitory computer-readable media of claim 1,wherein determining the first status of the second computing devicecomprises: attempting to bind to an exclusive messaging queueestablished at the out-messaging network device; and receiving a standbyindicator from the out-messaging network device when the attempt to bindis unsuccessful.
 27. A system configured to switch stream processing ofan event block object, sent from a publishing device to a subscribingdevice, to a first computing device from a third computing device thathas failed, the system comprising: the first computing device comprisinga first processor configured to execute a first event stream processingengine (ESPE); and a first non-transitory computer-readable mediumoperably coupled to the first processor, the first non-transitorycomputer-readable medium having first computer-readable instructionsstored thereon that, when executed by the first processor, cause thefirst computing device to determine a first status of the executingfirst ESPE as newly active; when the first status is determined as newlyactive, to determine a last published event block object identifier asan identifier that uniquely identifies a last event block objectpublished to an out-messaging network device; when the first status isdetermined as newly active, to select a next event block object havingan event block object identifier that is greater than the determinedlast published event block object identifier from the firstnon-transitory computer-readable medium; when the first status isdetermined as newly active, to publish the selected next event blockobject to the out-messaging network device; to receive a first eventblock object from the first ESPE executing at the first computingdevice, wherein the first event block object includes a uniqueidentifier of the first event block object; to determine a first statusof the first ESPE as active; and when the first status of the first ESPEis determined as active, to publish the received first event blockobject to the out-messaging network device; and a second computingdevice different from the first computing device and from the thirdcomputing device, the second computing device comprising a secondprocessor configured to execute a second ESPE; and a secondnon-transitory computer-readable medium operably coupled to the secondprocessor, the second non-transitory computer-readable medium havingsecond computer-readable instructions stored thereon that, when executedby the second processor, cause the second computing device to receivethe first event block object from the executing second ESPE, wherein thefirst event block object includes the unique identifier of the eventblock object; to determine a second status of the executing second ESPEas standby; and when the second status is determined as standby, tostore the received first event block object in the second non-transitorycomputer-readable medium.
 28. The system of claim 27, wherein the firstcomputer-readable instructions further cause the first computing deviceto establish a connection to the out-messaging network device usingconnection information.
 29. The system of claim 28, wherein the secondcomputer-readable instructions further cause the second computing deviceto establish a second connection to the out-messaging network deviceusing second connection information.
 30. A method of supporting failoverin an event stream processing system by switching stream processing ofan event block object, sent from a publishing device to a subscribingdevice, to a first computing device from a third computing device thathas failed, the method comprising: determining, by a first computingdevice, a first status of a first event stream processing engine (ESPE)as newly active, wherein the first ESPE is executing at the firstcomputing device; determining, by the first computing device, a lastpublished event block object identifier as an identifier that uniquelyidentifies a last event block object published to an out-messagingnetwork device; selecting, by the first computing device, a next eventblock object having an event block object identifier that is greaterthan the determined last published event block object identifier from afirst non-transitory computer-readable medium; publishing, by the firstcomputing device, the selected next event block object to theout-messaging network device; receiving, by the first computing device,a first event block object from the first ESPE executing at the firstcomputing device, wherein the first event block object includes a uniqueidentifier of the first event block object; determining, by the firstcomputing device, a first status of the first ESPE as active; when thefirst status of the first ESPE is determined as active, publishing, bythe first computing device, the received first event block object to theout-messaging network device; receiving a first event block object froma second ESPE executing at a second computing device different from thefirst computing device and from the third computing device, wherein thefirst event block object includes the unique identifier of the firstevent block object; determining, by the second computing device, a firststatus of the second ESPE as standby; and storing, by the secondcomputing device, the received first event block object in a secondnon-transitory computer-readable medium.